<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/1/9
 * Time: 23:28
 */

namespace app\common\model;

use org\UUID;
use think\Model;

class GameRoom extends Model
{
    protected $insert = ['create_time', 'room_uuid'];

    /**
     * 创建时间
     * @return bool|string
     */
    protected function setCreateTimeAttr()
    {
        return date('Y-m-d H:i:s');
    }

    /**
     * room_uuid
     */
    protected function setRoomUuidAttr()
    {
        return UUID::v4();
    }
}